<?php

$PREFIX = get('url.prefix');

header('Content-Type: application/atom+xml; charset="utf-8"');

echo '<?xml version="1.0" encoding="utf-8"?>'."\n";

?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title><?php echo utf8_encode($this->feed->title); ?></title>
  <link href="<?php echo $PREFIX; ?>/feeds/<?php echo $this->feed->name; ?>"/>
  <updated><?php echo date('c',strtotime($this->feed->updated)); ?></updated>
  <author>
    <name>Your Name Here</name>
  </author>
  <id><?php echo $PREFIX; ?>/feeds/<?php echo $this->feed->name; ?></id>
<?php

foreach($this->feed->findEntryModel() as $entry)
{
?>
  <entry>
    <title><?php echo utf8_encode($entry->title); ?></title>
    <link href="<?php echo $entry->link; ?>"/>
    <id><?php echo $PREFIX; ?>/entries/<?php echo $entry->id; ?></id>
    <updated><?php echo date('c',strtotime($entry->created)); ?></updated>
    <summary><?php echo utf8_encode($entry->summary); ?></summary>
  </entry>
<?php
}
?>
</feed>
